<?php
/**
 * Created by PhpStorm.
 * User: MSQ
 * Date: 2021/9/27
 * Time: 16:54
 */

namespace App\Handler\WebSocket;


use App\Model\Baiyou\ApiAccessToken;
use App\Model\Baiyou\PatientInfusionQueue;
use App\Utils\RedisHelp;
use App\Utils\WebSocketMessage;
use EasySwoole\EasySwoole\Config;

class QueueAddHandler extends BaseHandler
{
    /**
     * 白友登录 {"msgType":"queueList","checkType":1,"content":{"type":1}}
     * @return string
     */
    public function handler(): string
    {
        $type = intval($this->content['type'] ?? 0);
        if (in_array($type, [PatientInfusionQueue::TYPE_JD, PatientInfusionQueue::TYPE_JZ])) {
            return WebSocketMessage::getErrorMessage("排队类型错误");
        }

//        $data = WebSocketMessage::getMessage(WebSocketMessage::ByAuthRes, 'ok');
        return '';
    }
}
